package com.mall.ibatis.bean;

import java.io.Serializable;

import com.mall.util.StringUtil;
import com.thoughtworks.xstream.XStream;

@SuppressWarnings("serial")
public class Operator extends JQGridParameters implements Serializable,ICell,IFormat
{
	
	 /* Private Fields */
	
	private String opID;
	private String opWorkno;
	private String opName;
	private String opPassword;
	private String opSmfID;
	private String opSmfName;
	private String opJob;
	private String opStatus;
	private String opStatusName;
	private String opMaxDate;
	private String opLoginIP;
	private String opLoginDatetime;
	private Integer opLoginTime;
	private String opTel;
	private String opQQ;
	private String opEmail;
	private String opMemo;
	private String op_roleName;

	public String getOp_roleName() {
		return op_roleName;
	}
	public void setOp_roleName(String op_roleName) {
		this.op_roleName = op_roleName;
	}
	/* JavaBeans Properties */
	public String getOpID()
	{
		return opID;
	}
	public void setOpID(String opID)
	{
		this.opID = opID;
	}
	public String getOpWorkno()
	{
		return opWorkno;
	}
	public void setOpWorkno(String opWorkno)
	{
		this.opWorkno = opWorkno;
	}
	public String getOpName()
	{
		return opName;
	}
	public void setOpName(String opName)
	{
		this.opName = opName;
	}
	public String getOpPassword()
	{
		return opPassword;
	}
	public void setOpPassword(String opPassword)
	{
		this.opPassword = opPassword;
	}
	public String getOpSmfID()
	{
		return opSmfID;
	}
	public void setOpSmfID(String opSmfID)
	{
		this.opSmfID = opSmfID;
	}
	public String getOpJob()
	{
		return opJob;
	}
	public void setOpJob(String opJob)
	{
		this.opJob = opJob;
	}
	public String getOpStatus()
	{
		return opStatus;
	}
	public void setOpStatus(String opStatus)
	{
		this.opStatus = opStatus;
	}
	
	public String getOpStatusName() {
		return opStatusName;
	}
	public void setOpStatusName(String opStatusName) {
		this.opStatusName = opStatusName;
	}
	public String getOpMaxDate()
	{
		return opMaxDate;
	}
	public void setOpMaxDate(String opMaxDate)
	{
		this.opMaxDate = opMaxDate;
	}
	public String getOpLoginIP()
	{
		return opLoginIP;
	}
	public void setOpLoginIP(String opLoginIP)
	{
		this.opLoginIP = opLoginIP;
	}
	public String getOpLoginDatetime()
	{
		return opLoginDatetime;
	}
	public void setOpLoginDatetime(String opLoginDatetime)
	{
		this.opLoginDatetime = opLoginDatetime;
	}
	public Integer getOpLoginTime()
	{
		return opLoginTime;
	}
	public void setOpLoginTime(Integer opLoginTime)
	{
		this.opLoginTime = opLoginTime;
	}
	public String getOpTel()
	{
		return opTel;
	}
	public void setOpTel(String opTel)
	{
		this.opTel = opTel;
	}
	public String getOpQQ()
	{
		return opQQ;
	}
	public void setOpQQ(String opQQ)
	{
		this.opQQ = opQQ;
	}
	public String getOpEmail()
	{
		return opEmail;
	}
	public void setOpEmail(String opEmail)
	{
		this.opEmail = opEmail;
	}
	public String getOpMemo()
	{
		return opMemo;
	}
	public void setOpMemo(String opMemo)
	{
		this.opMemo = opMemo;
	}
	public String getOpSmfName()
	{
		return opSmfName;
	}
	public void setOpSmfName(String opSmfName)
	{
		this.opSmfName = opSmfName;
	}
	
	public String toCell()
	{
		// TODO Auto-generated method stub
		StringBuffer cellBuffer  = new StringBuffer();
		cellBuffer.append("<opID><![CDATA[" + StringUtil.null2Empty(opID)+"]]></opID>");
		cellBuffer.append("<opWorkno><![CDATA[" + StringUtil.null2Empty(opWorkno)+"]]></opWorkno>");
		cellBuffer.append("<opName><![CDATA[" + StringUtil.null2Empty(opName)+"]]></opName>");
		cellBuffer.append("<opPassword><![CDATA[" + StringUtil.null2Empty(opPassword)+"]]></opPassword>");
		cellBuffer.append("<opSmfID><![CDATA[" + StringUtil.null2Empty(opSmfID)+"]]></opSmfID>");
		cellBuffer.append("<opSmfName><![CDATA[" + StringUtil.null2Empty(opSmfName)+"]]></opSmfName>");
		cellBuffer.append("<opJob><![CDATA[" + StringUtil.null2Empty(opJob)+"]]></opJob>");
		cellBuffer.append("<opStatus><![CDATA[" + StringUtil.null2Empty(opStatus)+"]]></opStatus>");
		cellBuffer.append("<opStatusName><![CDATA[" + StringUtil.null2Empty(opStatusName)+"]]></opStatusName>");
		cellBuffer.append("<opMaxDate><![CDATA[" + StringUtil.null2Empty(opMaxDate)+"]]></opMaxDate>");
		cellBuffer.append("<opLoginIP><![CDATA[" + StringUtil.null2Empty(opLoginIP)+"]]></opLoginIP>");
		cellBuffer.append("<opLoginDatetime><![CDATA[" + StringUtil.null2Empty(opLoginDatetime)+"]]></opLoginDatetime>");
		cellBuffer.append("<opLoginTime><![CDATA[" + StringUtil.integerToString(opLoginTime)+"]]></opLoginTime>");
		cellBuffer.append("<opTel><![CDATA[" + StringUtil.null2Empty(opTel)+"]]></opTel>");
		cellBuffer.append("<opQQ><![CDATA[" + StringUtil.null2Empty(opQQ)+"]]></opQQ>");
		cellBuffer.append("<opEmail><![CDATA[" + StringUtil.null2Empty(opEmail)+"]]></opEmail>");
		cellBuffer.append("<opMemo><![CDATA[" + StringUtil.null2Empty(opMemo)+"]]></opMemo>");
		cellBuffer.append("<op_roleName><![CDATA[" + StringUtil.null2Empty(op_roleName)+"]]></op_roleName>");
		return cellBuffer.toString();
	}
	
	public String getCellID()
	{
		return StringUtil.null2Empty(opID);
	}
	
	public String toXML()
	{
		XStream xStream = new XStream();
		xStream.alias(this.getClass().getSimpleName(),this.getClass());
		return xStream.toXML(this);
	}
	public String optionText() {
		// TODO Auto-generated method stub
		return this.opName;
	}
	public String optionTitle() {
		// TODO Auto-generated method stub
		return "["+this.opID+"]"+this.opName;
	}
	public String optionValue() {
		// TODO Auto-generated method stub
		return this.opID;
	}
	public String toKeyValue() {
		// TODO Auto-generated method stub
		return this.opID+":"+this.opName;
	}
	
	
	
}